import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [{
  path: '/home',
    name:'Home',
   component:Home
   
  },
  { 
   path:'/',
   redirect:'/home',
  //  component:Home

  },
   {
    path: '/classification',
    name: 'Classification',
    component: () => import('../views/Classification.vue')

  },
  {
    path: '/shoppin',
    name: 'Shoppin',
    component: () => import('../views/Shoppin.vue')
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('../views/My.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/favorites',
    name: 'Favorites',
    component: () => import('../views/Favorites.vue')
  },
  {
    path: '/footprint',
    name: 'Footprint',
    component: () => import('../views/Footprint.vue')
  },
  {
    path: '/order',
    name: 'Order',
    component: () => import('../views/Order.vue')
  },
  {
    path: '/reg',
    name: 'Reg',
    component: () => import('../components/common/Reg.vue')
  },
  {
    path: '/headPortrait',
    name: 'HeadPortrait',
    component: () => import('../components/taobao/HeadPortrait.vue')
  },
  {
    path: '/details',
    name: 'Details',
    component: () => import('../views/Details.vue')
  }
  
  //   {
  //     path: '',
  // name: '',
  // route level code-splitting
  // this generates a separate chunk (about.[hash].js) for this route
  // which is lazy-loaded when the route is visited.
  // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  //   }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router